home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / choose.arc / CHOOSE.DOC < prev   
Encoding:
Text File  |  1987-04-06  |  1.3 KB  |  22 lines

  1. Choose.com allows the setting of errorlevels in a DOS bat file.  This
  2. enables you to write a menu driven front end.
  3.  
  4. The procedure is simple - first call a text file containing the menu
  5. choices. Then insert the call to CHOOSE before the command(s)
  6. IF ERRORLEVEL <#> GOTO <label> -- where <#> is a number (in descending
  7. order) from 9 to 0 and <label> is a DOS label (e.g. :choiceone).
  8.  
  9. You can use all ten numbers but this requires a ten different labels
  10. The program prompts for selection.  After the selection is made, the bat
  11. file branches to the specific label.  Here you can change directories and
  12. call programs.  When control is returned to the bat file have a GOTO send
  13. the program back to the top and place the menu on the screen again.
  14.  
  15. For an example of this, see the ASHTON-TATE TECH NOTES for March, 1986.
  16. The code for the program comes from pages 29 - 34.
  17.  
  18. I have been using a program similar to this, but it didn't have the ability
  19. to echo the number of the choice to the screen.  I find this a signigicant
  20. improvement.  I use this program to call sub-menus which in turn call the
  21. main menu when the user decides to do so.
  22.